<?php
// +----------------------------------------------------------------------
// | Yzncms [ 御宅男工作室 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2018 http://yzncms.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | fastadmin: https://www.fastadmin.net/
// +----------------------------------------------------------------------

// +----------------------------------------------------------------------
// | 手机短信接口
// +----------------------------------------------------------------------
namespace app\team\controller;

use app\admin\model\AdminUser;
use app\common\controller\TeamApi;
use app\common\model\StaffModel;


/**
 * @title 授权登陆
 * @controller api\controller\Sms
 * @group base
 */
class Login extends TeamApi
{
    protected $noNeedLogin = ['*'];

    public function  login(){
        $data = (new AdminUser())->login($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }

    public function forgotPwd(){
        $data = (new AdminUser())->forgotPwd($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }
}
